// components/navi-compt/navi-compt.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    title: String,
    first: Boolean,
    latest: Boolean
  },

  /**
   * 组件的初始数据
   */
  data: {
    disLeftSrc: "./images/triangle.dis@left.png",
    leftSrc: "./images/triangle@left.png",
    disRightSrc: "./images/triangle.dis@right.png",
    rightSrc: "./images/triangle@right.png"
  },

  /**
   * 组件的方法列表
   */
  methods: {

    onLeft: function(event) {
      if (this.properties.latest) return;
      this.triggerEvent("onLeft", {}, {})
    },

    onRight: function(event) {
      if (this.properties.first) return;
      this.triggerEvent("onRight", {}, {})
    },

  }

})